#pragma once
#include "common.h"

struct gnss_data{
    size_t cnt;
    int gnrmc_status;
    int gngga_status;
    int satellites_num;
    std::string datetime;
    double latitude;
    double longitude;
    double altitude;
};

class Gnss:public SensorAbstraction{
private:
    /* data */
    int fd;
    std::string dev_name;
    char buffer[256];
    std::string raw_data;
    std::string datetime;
    std::unique_ptr<struct gnss_data> p_gnss_data;
public:
    Gnss(const std::string& sensor_name_,const int& run_mode_, const std::string& dev_name_);
    ~Gnss();

    int Init() override;
    int DataCollection() override;                             //传感器数据采集
    int DataProcessing() override;                             //传感器数据处理
    int DataStorage() override;                                //传感器数据储存
    int DataPrint() override;
};


